package com.modernyuanshiren.withwinds;

import com.modernyuanshiren.Abstract2DGame;

public abstract class CommonWindGame extends
		Abstract2DGame<WindStatus, WindSingleAction> {
	private static final String NOT_TARGET_HOLE_NAME = "非目標坑";
	private static final String DANGER_NAME = "无底坑";
	private static final String TARGET_HOLE_NAME = "目標坑";
	private static final String TARGET_NAME = "目標";
	private static final String WALL_NAME = "壁";
	protected static final String BOX_NAME = "箱子";
	protected static final String CHARACTER_NAME = "人";
	private static CommonWindGame game;

	public CommonWindGame(Class<WindStatus> clazz) {
		super(clazz);
		game = this;
	}

	public CommonWindGame() {
		this(WindStatus.class);
	}

	@Override
	protected String[] getLegends() {
		return new String[] { WALL_NAME, TARGET_NAME, TARGET_HOLE_NAME,
				DANGER_NAME, NOT_TARGET_HOLE_NAME };
	}

	public static CommonWindGame getGameContext() {
		return game;
	}

	public String getCharacterName() {
		return CHARACTER_NAME;
	}

	public String getBoxName() {
		return BOX_NAME;
	}

	public String getDangerName() {
		return DANGER_NAME;
	}

	public String getTargetHoleName() {
		return TARGET_HOLE_NAME;
	}

	public String getTargetName() {
		return TARGET_NAME;
	}

	public String getWallName() {
		return WALL_NAME;
	}

	public String getNotTargetHoleName() {
		return NOT_TARGET_HOLE_NAME;
	}

	public int getTargetHoleCount() {
		return getMap().getCountOf(TARGET_HOLE_NAME);
	}

}
